package org.ljy.lotterysystem.service;

import org.ljy.lotterysystem.controller.param.DrawPrizeParam;
import org.ljy.lotterysystem.controller.param.ShowWinningRecordsParam;
import org.ljy.lotterysystem.dao.dataobject.WinningRecordsDO;
import org.ljy.lotterysystem.service.dto.WinningRecordDTO;

import java.util.List;

public interface IDrawPrizeService {

    /**
     * 异步抽奖，该接口只做奖品数校验
     *
     * @param param
     */
    void drawPrize(DrawPrizeParam param);


    /**
     * 检查抽奖参数是否有效
     */
    Boolean checkDrawPrizeValid(DrawPrizeParam param);

    /**
     * 保存中奖者名单
     * @param param
     */
    List<WinningRecordsDO> saveWinnerRecords(DrawPrizeParam param);


    /**
     * 删除活动下的中奖者名单
     * @param activityId
     * @param prizeId
     */
    void deleteRecords(Long activityId,Long prizeId);

    /**
     * 获取中奖情况
     * @param param
     * @return
     */
    List<WinningRecordDTO> getRecords(ShowWinningRecordsParam param);
}
